﻿import request from '/@/utils/request';
enum Api {
  AddCRMCustomer = '/api/cRMCustomer/add',
  DeleteCRMCustomer = '/api/cRMCustomer/delete',
  UpdateCRMCustomer = '/api/cRMCustomer/update',
  PageCRMCustomer = '/api/cRMCustomer/page',
  DetailCRMCustomer = '/api/cRMCustomer/detail',
  GetRegionTree = '/api/sysRegion/regionTree',

}

// 增加CRM客户
export const addCRMCustomer = (params?: any) =>
	request({
		url: Api.AddCRMCustomer,
		method: 'post',
		data: params,
	});

// 删除CRM客户
export const deleteCRMCustomer = (params?: any) => 
	request({
			url: Api.DeleteCRMCustomer,
			method: 'post',
			data: params,
		});

// 编辑CRM客户
export const updateCRMCustomer = (params?: any) => 
	request({
			url: Api.UpdateCRMCustomer,
			method: 'post',
			data: params,
		});

// 分页查询CRM客户
export const pageCRMCustomer = (params?: any) => 
	request({
			url: Api.PageCRMCustomer,
			method: 'post',
			data: params,
		});

// 详情CRM客户
export const detailCRMCustomer = (id: any) => 
	request({
			url: Api.DetailCRMCustomer,
			method: 'get',
			data: { id },
		});



	export const getRegionTree = (id: any) => 
		request({
			url: Api.GetRegionTree,
			method: 'get',
			 data: { id },
		});

